The H5R_GET_REGION function retrieves a dataspace associated with a region reference.
Result = H5R_GET_REGION(Dataset_id, Reference)
The Result gives the identifier of the dataspace with the region selected.
An integer giving the identifier in which the reference dataset is located.
An H5 reference structure giving the reference number to open.
None
Assuming the file, 'hdf5_out.h5' was created using the example in H5F_CREATE, the dataspace region saved in the reference attached to the “Hanning” dataset could be obtained as follows:
fid = H5F_OPEN('hdf5_out.h5')
dataset_id = H5D_OPEN(fid,'Hanning')
attr_id = H5A_OPEN_NAME(dataset_id,'Ref')
ref = H5A_READ(attr_id)
dataspace_id = H5R_GET_REGION(dataset_id,ref)
6.2 |
Introduced |